﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Moni
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            //获取注册的账号和密码
            string Name = this.txtnn1.Text;
            string password = this.txtnn2.Text;

            //非空验证
            if (this.txtnn1.Text != "" && this.txtnn2.Text != "")
            {
                
                string sql = string.Format("insert Lin(Name,password)select'{0}','{1}'", Name, password);
                bool br = DBHelper.Datann(sql);
                MessageBox.Show("注册成功","提示");
            }
            else
            {
                MessageBox.Show("账号和密码不能为空！！！", "提示");
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {
        }
    }
}
